package com.briup.day12;

import com.briup.day06.Student;

import java.util.LinkedList;
import java.util.List;

/**
 * @author lining
 * @date 2024/1/23 11:19
 */
public class TestLinkedList {
    public void method(){
        //画图内存存储方式（双向链表）
        List<String> list = new LinkedList<>();//创建一个空的集合
        list.add("a");
        list.add("b");
        list.add("c");
        System.out.println(list);
        //删除
        list.remove("b");
        System.out.println(list);
        System.out.println(list.get(1));
    }
    public void method2(){
        LinkedList<Student> list  = new LinkedList();
        list.getFirst();
        list.getLast();
    }
    public static void main(String[] args) {
        TestLinkedList t = new TestLinkedList();
        t.method();
    }
}
